<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('设备端口详情')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-cargo-edit" th:object="${bizDeviceCargo}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">租户标识：</label>
                <div class="col-sm-8">
                    <input name="tenantId" th:field="*{tenantId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">设备ID：</label>
                <div class="col-sm-8">
                    <input name="deviceId" th:field="*{deviceId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">设备号：</label>
                <div class="col-sm-8">
                    <input name="deviceSn" th:field="*{deviceSn}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">端口编号：</label>
                <div class="col-sm-8">
                    <input name="number" th:field="*{number}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">端口容量：</label>
                <div class="col-sm-8">
                    <input name="capacity" th:field="*{capacity}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电费分类：</label>
                <div class="col-sm-8">
                    <input name="goodsCategory" th:field="*{goodsCategory}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电费ID：</label>
                <div class="col-sm-8">
                    <input name="goodsId" th:field="*{goodsId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电费名称：</label>
                <div class="col-sm-8">
                    <input name="goodsName" th:field="*{goodsName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电费图片：</label>
                <div class="col-sm-8">
                    <input name="goodsDiagram" th:field="*{goodsDiagram}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电费售价：</label>
                <div class="col-sm-8">
                    <input name="goodsPrice" th:field="*{goodsPrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电费进价：</label>
                <div class="col-sm-8">
                    <input name="goodsCostPrice" th:field="*{goodsCostPrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电费库存：</label>
                <div class="col-sm-8">
                    <input name="goodsStock" th:field="*{goodsStock}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">折扣：</label>
                <div class="col-sm-8">
                    <input name="goodsDiscount" th:field="*{goodsDiscount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">端口状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('cargoUseStatus')}">
                        <input type="radio" th:id="${'useStatus_' + dict.dictCode}" name="useStatus" th:value="${dict.dictValue}" th:field="*{useStatus}">
                        <label th:for="${'useStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">启用状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('enableStatus')}">
                        <input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
                        <label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
        </form>
        <div class="form-control-static" style="text-align:center;">
            <button th:onclick="'javascript:closeItem()'" class="btn btn-danger" type="button">关闭</button>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        //使页面不可编辑
        function disableOcx() {
            var form = document.forms[0];
            for ( var i = 0; i < form.length; i++) {
                var element = form.elements[i];
                //部分元素可以编号 element.name 是元素自定义 name
                if (element.name != "auditEntity.auditContent"
                        && element.name != "auditEntity.auditAutograph"
                        && element.name != "auditEntity.auditTime"
                        && element.name != "auditEntity.auditState"
                        && element.name != "submitBtn"
                        && element.name != "reset"
                        && element.name != "id"
                        && element.name != "processInstanceId"
                        && element.name != "updateForm") {
                    element.disabled = "true";
                }
            }
        }
        window.onload = disableOcx;//当页面加载的时候执行此函数
        var prefix = ctx + "biz/cargo";
    </script>
</body>
</html>